-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract text with AI command #2191
Conversation
@@ -84,7 +84,7 @@ class Orchestra( | |||
private val onCommandStart: (Int, MaestroCommand) -> Unit = { _, _ -> }, | |||
private val onCommandComplete: (Int, MaestroCommand) -> Unit = { _, _ -> }, | |||
private val onCommandFailed: (Int, MaestroCommand, Throwable) -> ErrorResolution = { _, _, e -> throw e }, | |||
private val onCommandWarned: (Int, MaestroCommand) -> Unit = { _, _ -> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bit of auto-reformatting in this class. The main relevant change is extractTextWithAICommand
method
Not sure why detekt pushed so many styling changes 🤷 Perhaps these classes were not touched since the style changed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! 😄
@@ -413,6 +415,26 @@ class Orchestra( | |||
false | |||
} | |||
|
|||
private fun extractTextWithAICommand(command: ExtractTextWithAICommand): Boolean = runBlocking { | |||
// Extract text from the screen using AI | |||
if (ai == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Although this ai
variable was not added now, it probably deserves a better name
Introducing a
extractTextWithAI
command that uses LLM to extract text form a screenshot. Some situations where it is useful:Usage Example